<?php

/**
 * winbinder 패키지 
 * 
 * 
 * @package php.ui.winbinder
 */


/**
 * WBGauge
 * 
 * Progress Bar 
 *
 * @package php.ui.winbinder
 */
class WBGauge extends WBRange { 
	
	const PBS_SMOOTH = 0x01;			// smooth 
	const PBS_VERTICAL = 0x04;			// vertical
	const PBS_MARQUEE = 0x08; 			// 
	const PBS_SMOOTHREVERSE = 0x10;

	const PBST_NORMAL = 0x0001;
	const PBST_ERROR = 0x0002;
	const PBST_PAUSED = 0x0003;	
	
	/**
	 * 생성자
	 * 
	 */
	public function __construct($options = array()) { 
		$options['class'] = Gauge;

		parent::__construct($options);
	}
	
	public function initComponent() { 
		parent::initComponent();
		
		if (isset($this->smooth)) { $this->setSmooth($this->getOption('smooth')); }
		if (isset($this->vertical)) { $this->setVertical($this->getOption('vertical')); }
	}
	
	public function setSmooth($isSmooth = false) { 
		if ($isSmooth) { 
			$this->extern('AddWindowStyle', self::PBS_SMOOTH);
		} else { 
			$this->extern('DeleteWindowStyle', self::PBS_SMOOTH);
		}
	}
	
	public function setVertical($isVertical = false) { 
		if ($isVertical) { 
			$this->extern('AddWindowStyle', self::PBS_VERTICAL);
		} else { 
			$this->extern('DeleteWindowStyle', self::PBS_VERTICAL);
		}
	}	
}

?>